package com.glorystone.ins.service;

import com.glorystone.ins.common.common.PageVo;
import com.glorystone.ins.domain.CapitalRecord;
import com.glorystone.ins.domain.Channel;
import com.glorystone.ins.domain.Order;
import com.glorystone.ins.domain.SysUser;
import com.glorystone.ins.enums.FlowOperateTypeEnum;
import com.glorystone.ins.interceptor.PageList;
import com.glorystone.ins.vo.*;

import java.util.Date;
import java.util.List;

public interface OrderService {
    Order selectOrderInfo(OrderQueryConditionVo order);
    List<Order> findOrderList(String channelId, String ordNum, String insurant, Date insureStartDate);

    Order findOrderByCode(String ordercode);

	PageList<OrderViewVO> selectorderList(PageVo vo);

	OperateResult resetOrder(OrderQueryConditionVo order, OperateResult jsonResult);

    OperateResult passOrder(OrderQueryConditionVo order, OperateResult jsonResult);

	int insertOrder(Order order,String[] typeInsurance2);

    OrderVo findOrderVoByCode(String ordCode);

	List<OrderVo> findOrderVoList(String ordNum, String insurant, String insureStartDate, int i);
	/**
     *  保险公司已结算订单
     * @param vo
     * @return
     */
    PageList<OrderVo> getInsyrerData(PageVo vo);


    /**
     *  渠道已结算订单
     * @param vo
     * @return
     */
    PageList<OrderVo> getChannelData(PageVo vo);
/**
     * 已结算保险公司订单下载
     * @param insyrerId
     * @param ordNum
     * @param channelId
     * @param insureStartDate
     * @param insureEndDate
     * @param plateNum
     * @param user
 * @return
     */
    List<OrderVo> findAlreadPayCompany(String insyrerId, String ordNum, String channelId, String insureStartDate, String insureEndDate, String plateNum, SysUser user);

    /**
     * 已结算渠道订单下载
     * @param insyrerId
     * @param ordNum
     * @param channelId
     * @param insureStartDate
     * @param insureEndDate
     * @param plateNum
     * @param user
     * @return
     */
    List<OrderVo> findAlreadPayChannel(String insyrerId, String ordNum, String channelId, String insureStartDate, String insureEndDate, String plateNum, SysUser user);
    int modifyPayState(Order order, Long tid, String ordmessage, FlowOperateTypeEnum flowOperateTypeEnum);

    List<OrderViewVO> downLoadNeedPay(Long insurerId1, String plateNum1, String channelId1, int themeKey, int orderStatus);

    PageList<OrderVo> findOrderVoList(Long tid, PageVo vo);

	OperateResult payOrder(OrderQueryConditionVo order, OperateResult result);

	List<CapitalRecord> selectRecordByOrderId(Long orderId);
    
    boolean updateByOrdCode(Order order);

	List<OrderViewVO> dwChannelNeedPay(Long insurerId2, String plateNum2, String channelId2, String insurantStartDate,String insurantEndDate);
	Channel findChannel(SysUser user);

	OperateResult payChannelOrder(OrderQueryConditionVo order, OperateResult result);

    ChannelCountVo countChannelOrderInfo(Long channelId);
    
    Order onlyOrdNum(String ordNum);

    PageList<OrderVo> findOrderVoListAll(PageVo vo);

    int modifyProductId(Order order);

    OperateResult resetOrderDirect(OperateResult operateResult,Long tid);
}